package com.atguigu.auth.feign;

import com.atguigu.auth.feign.fallback.MemberFallbackService;
import com.atguigu.common.utils.R;
import com.atguigu.common.vo.SocialUser;
import com.atguigu.auth.vo.UserLoginVo;
import com.atguigu.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author polaris
 * @date 2021/1/21 6:10 下午
 */

@FeignClient(value = "gulimall-member", fallback = MemberFallbackService.class)
public interface MemberFeignService {

  @PostMapping("/member/member/register")
  R register(@RequestBody UserRegisterVo registerVo);


  @PostMapping("/member/member/login")
  R login(@RequestBody UserLoginVo loginVo);

  @PostMapping("/member/member/oauth2/login")
  R oauthlogin(@RequestBody SocialUser socialUser);

}
